-- GENERATED SPELL FOR [Yorus the Flesh Harvester] --


function spell0_24214(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24214', 667, 1)
end

function spell1_24214(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_24214', 557, 1)
end

function spell2_24214(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_24214', 2000, 1)
end

function Sorts_24214(pUnit, Event)
local choix_sorts_24214 = math.random(0, 2)
if choix_sorts_24214 == 0 then
pUnit:RegisterEvent('spell0_24214', 1, 1)
end
if choix_sorts_24214 == 1 then
pUnit:RegisterEvent('spell1_24214', 1, 1)
end
if choix_sorts_24214 == 2 then
pUnit:RegisterEvent('spell2_24214', 1, 1)
end
end

function mob24214_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24214', math.random(1500, 3000), 1)
end

function mob24214_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24214_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24214_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24214, 1, 'mob24214_Action')
RegisterUnitEvent(24214, 2, 'mob24214_Leave')
RegisterUnitEvent(24214, 3, 'mob24214_Kill')
RegisterUnitEvent(24214, 4, 'mob24214_Die')
